package com.aaa.service.back.Impl;

import com.aaa.entity.Purchase;
import com.aaa.entity.PurchaseDetails;
import com.aaa.mapper.back.PurchaseMapper;
import com.aaa.service.back.PurchaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class PurchaseServiceImpl implements PurchaseService {

    @Resource
    private PurchaseMapper purchaseMapper;

    @Override
    public List<Map<String, Object>> findPurchaseByPurchaseState1() {
        return purchaseMapper.findPurchaseByPurchaseState1();
    }

    @Override
    public Purchase findByPurchaseId(String purchaseId) {
        return purchaseMapper.findByPurchaseId(purchaseId);
    }

    @Override
    public List<Map<String, Object>> findPurchaseByPurchaseState0(Integer purchaseState) {
        return purchaseMapper.findPurchaseByPurchaseState0(purchaseState);
    }

    @Override
    public List<Map<String, Object>> findPurchaseByPurchaseState2(Integer purchaseState) {
        return purchaseMapper.findPurchaseByPurchaseState2(purchaseState);
    }

    @Override
    public int editPurchase0(String purchaseId) {
        return purchaseMapper.editPurchase0(purchaseId);
    }

    @Override
    public List<Map<String, Object>> findPurchaseDetails(String purchaseId) {
        return purchaseMapper.findPurchaseDetails(purchaseId);
    }

    @Override
    public List<PurchaseDetails> findByPurchaseDetails(String purchaseId) {
        return purchaseMapper.findByPurchaseDetails(purchaseId);
    }

    @Override
    public int addPurchase(Purchase purchase) {
        return purchaseMapper.addPurchase(purchase);
    }

    @Override
    public int addPurchaseDetails(PurchaseDetails purchaseDetails) {
        return purchaseMapper.addPurchaseDetails(purchaseDetails);
    }

    @Override
    public int editPurchase(Purchase purchase) {
        return purchaseMapper.editPurchase(purchase);
    }

    @Override
    public String findPurchaseByMAX() {
        return purchaseMapper.findPurchaseByMAX();
    }
}
